package com.moyu.crowdsource.controller;

import com.moyu.crowdsource.service.OSSService;
import com.moyu.crowdsource.util.Msg;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("${api.base}/test")
@Api(value="测试controller",tags={"测试接口"})
public class TestController {

    @Autowired
    OSSService service;

  @PostMapping("/findout")
  public Msg findout(String content, HttpServletRequest request) {
    System.out.println(request.getParameter("content"));
    System.out.println(content);
    return Msg.success().add("test",service.getTest());
  }
}
